 // 路由器 ： 包含多个 路由   配置路由目的： 让组件 和 指定的路径 绑定在一起   当访问路径的时候，就会加载该组件 
 import { createMemoryHistory, createRouter } from 'vue-router'

 // 在创建路由器的时候， 指定路由规则：让组件 和 指定的路径 绑定在一起 
 const routes=[
	{
		path:'/',
		redirect: '/loginvue' //路径的重定向(跳转)
	},
	{
	   path:'/loginvue',
	   name:'loginvue',
	   component:()=>import('@/components/LoginVue.vue')
   },
	 {
		 path:'/main',
		 name:'main',
		 component:()=>import('@/components/Main.vue'),
		 children:[
			 {
				 path:'/main',
				 redirect:'/main/index'
			 },
			 {
				 path:'/main/index',
				 component:()=>import('@/components/Index.vue')
			 },
			 {
				 path:'/main/CompanyManagement',
				 component:()=>import('@/components/SystemManagement/CompanyManagement.vue')
			 },
			 {
				 path:'/main/MenuManagement',
				 component:()=>import('@/components/SystemManagement/MenuManagement.vue')
			 },
			 {
				 path:'/main/RoleManagement',
				 component:()=>import('@/components/SystemManagement/RoleManagement.vue')
			 },
			 {
				 path:'/main/UserManagement',
				 component:()=>import('@/components/SystemManagement/UserManagement.vue')
			 },
			 {
				 path:'/main/CourseClassification',
				 component:()=>import('@/components/CourseManagement/CourseClassification.vue')
			 },
			 {
				 path:'/main/CourseEvaluation',
				 component:()=>import('@/components/CourseManagement/CourseEvaluation.vue')
			 },
			 {
				 path:'/main/CourseManagement',
				 component:()=>import('@/components/CourseManagement/CourseManagement.vue')
			 },
			 {
				 path:'/main/CourseOrder',
				 component:()=>import('@/components/CourseManagement/CourseOrder.vue')
			 },
			 {
				 path:'/main/CourseVideo',
				 component:()=>import('@/components/CourseManagement/CourseVideo.vue')
			 },
			 {
				path:'/main/PointsManagement',
				component:()=>import('@/components/PointsManagement.vue')
			},
			{
				path:'/main/ProblemManagement',
				component:()=>import('@/components/ProblemAndReplyManagement/ProblemManagement.vue')
			},
			{
				path:'/main/ReplyManagement',
				component:()=>import('@/components/ProblemAndReplyManagement/ReplyManagement.vue')
			},
			{
				path:'/main/ConsultationManagement',
				component:()=>import('@/components/ProblemAndReplyManagement/ConsultationManagement.vue')
			},
			{
				path:'/main/Consult',
				component:()=>import('@/components/ConsultManagement/Consult.vue')
			},
			{
				path:'/main/ConsultLevel',
				component:()=>import('@/components/ConsultManagement/ConsultLevel.vue')
			},
			{
				path:'/main/Charge',
				component:()=>import('@/components/ConsultManagement/Charge.vue')
			},
			{
				path:'/main/Specialty',
				component:()=>import('@/components/ConsultManagement/Specialty.vue')
			},
			{
				path:'/main/ConsultingOrder',
				component:()=>import('@/components/ConsultManagement/ConsultingOrder.vue')
			},
			{
				path:'/main/EvaluationManagement',
				component:()=>import('@/components/ConsultManagement/EvaluationManagement.vue')
			},
			{
				path:'/main/MessageManagement',
				component:()=>import('@/components/ConsultManagement/MessageManagement.vue')
			},
			{
				path:'/main/FeeManagement',
				component:()=>import('@/components/ConsultManagement/FeeManagement.vue')
			},
			{
				path:'/main/Information',
				component:()=>import('@/components/Information.vue')
			},
			{
				path:'/main/article',
				component:()=>import('@/components/ContentManagement/Article.vue')
			},
			{
				path:'/main/articleCategory',
				component:()=>import('@/components/ContentManagement/ArticleCategory.vue')
			},
			{
				path:'/main/fmCategory',
				component:()=>import('@/components/ContentManagement/FmCategory.vue')
			},
			{
				path:'/main/fm',
				component:()=>import('@/components/ContentManagement/Fm.vue')
			},
			{
				path:'/main/psychologicalKnowledge',
				component:()=>import('@/components/ContentManagement/PsychologicalKnowledge.vue')
			},
			{
				path:'/main/publicWelfareCenter',
				component:()=>import('@/components/ContentManagement/PublicWelfareCenter.vue')
			},
			{
				path:'/main/recycleBin',
				component:()=>import('@/components/ContentManagement/RecycleBin.vue')
			},
			{
				path:'/main/psychologicalManagement',
				component:()=>import('@/components/PsychologicalTest/PsychologicalManagement.vue')
			},
			{
				path:'/main/questionManagement',
				component:()=>import('@/components/PsychologicalTest/QuestionManagement.vue')
			},
		 ]
	 }
 ]
 const router = createRouter({
	 // 路由的方式： 两种： 基于history   
	 history:createMemoryHistory(),
	 routes
 })
 //对路由进行暴露
 export default router; // 路由器 ： 包含多个 路由   配置路由目的： 让组件 和 指定的路径 绑定在一起   当访问路径的时候，就会加载该组件 
